'\"macro stdmacro
.\"
.\" Copyright (c) 2021 Red Hat.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMDAMONGODB 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdamongodb\f1 \- MongoDB database metrics
.SH DESCRIPTION
\fBpmdamongodb\fP is a Performance Co-Pilot (PCP) Performance Metrics
Domain Agent (PMDA) which extracts live performance data from a running
MongoDB database server.
.SH CONFIGURATION
Firstly, \f3pmdamongodb\f1 requires installation of the
.B pymongo
support packages \- a general purpose Python module for querying MongoDB.
.PP
Next, \fBpmdamongodb\fP reads an optional ini-style configuration file:
.IP
.PD 0
.IP
.I \f(CR$PCP_PMDAS_DIR\fP/mongodb/mongodb.conf
.PD
.PP
This file currently allows for two sections, one for configuring the
MongoDB socket connection, the other for authentication.
.PP
.B [connection]
.TP 15
.B host \fR(\fP\fIlocalhost\fP\fR)\fP
Connect to the MongoDB socket on the given hostname.
.TP
.B port \fR(\fP\fI27017\fP\fR)\fP
Connect to the MongoDB socket on the given port.
.PP
.B [authentication]
.TP 15
.B username \fR(\fP\fIempty\fP\fR)\fP
Username to connect to the database.
.TP
.B password \fR(empty)\fP
Password to connect to the database.
.PD
.SH INSTALLATION
To install, the following must be done as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/mongodb
# ./Install
.fi
.ft P
.RE
.sp 1
To uninstall, the following must be done as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/mongodb
# ./Remove
.fi
.ft P
.RE
.sp 1
\fBpmdamongodb\fP is launched by \fBpmcd\fP(1) and should never be
executed directly.
The \fBInstall\fP and \fBRemove\fP scripts notify \fBpmcd\fP(1) when
the agent is installed or removed.
.SH FILES
.TP 5
.I \f(CR$PCP_PMDAS_DIR\fP/mongodb/mongodb.conf
configuration file for the \fBpmdamongodb\fR agent
.TP
.I \f(CR$PCP_PMDAS_DIR\fP/mongodb/Install
installation script for the \fBpmdamongodb\fR agent
.TP
.I \f(CR$PCP_PMDAS_DIR\fP/mongodb/Remove
undo installation script for the \fBpmdamongodb\fR agent
.TP
.I \f(CR$PCP_LOG_DIR\fP/pmcd/mongodb.log
default log file for messages from the \fBpmdamongodb\fR agent
.PP
Note that the usual/default value for \fB$PCP_PMDAS_DIR\fP is
.B /var/lib/pcp/pmdas
and the default for \fB$PCP_LOG_DIR\fP is
.B /var/log/pcp
but these settings are platform dependent.
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fR(5).
.SH SEE ALSO
.BR PCPIntro (1)
and
.BR pmcd (1).

.\" control lines for scripts/man-spell
.\" +ok+ pmdamongodb mongodb pymongo
